#{extends 'orgLead.html' /}
#{ifErrors} 
	${error} 
#{/ifErrors}


<form action = "@{Application.addRelationBetweenDepartments()}	">
<input type = "text" disabled="disabled" value = "${dep.name}">
<select name = "RelationToSetId">
<option value = "0.0">Relation</option>
#{if orgRelations}
#{list items: orgRelations, as:'relation'}
<option value = "${relation.id}">${relation.relation}</option>
#{/list}
</select>
#{/if}
<input type = "hidden" name = "currentId" value = "${dep.id}">
<input type = "hidden" name = "relId" value = "${relId}">
 
<select name = "depToSetId">
<option value = "0.0">Department</option>
#{if orgDeps}
#{list items:orgDeps, as:'deps'}
<option value = "${deps.id}">${deps.name}</option>
#{/list}
#{/if} 
</select>

<input type = "submit" name = "set" value = "Set Relation">

<span style="color: #c00" class="error">#{error 'set' /}</span>
</form>

<br>
<br>
<br>
<a href = "@{Application.viewDepartment(dep.id)}">Back to ${dep.name}</a>